﻿@using MealBooking.Core.Models.Meals;
@model List<MealCategory>
@{
    ViewBag.HeaderTitle = "Meal Category";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<ul data-role="listview" data-inset="true">
    @if (Model != null && Model.Count != 0)
    {
        <li data-role="list-divider">Category<span class="ui-li-count">@Model.Count</span></li>
        foreach (var category in Model)
        {
        <li><a href="@Url.Action("OrderNewMeal", "Meal", new { id = category.Id })">
            <h3>
                @category.Name
                @if (category.Price != 0)
                {
                    <span>[Price : @category.Price.ToString()]</span>
                }
            </h3>
            <p>@category.Description</p>
        </a></li>
        }
    }
    else
    {
        <li>No Category Yet.</li> 
    }
</ul>
